//
//  FactoryModel.swift
//  DianShangWen
//
//  Created by 周文轩 on 15/3/31.
//  Copyright (c) 2015年 &#21608;&#25991;&#36713;. All rights reserved.
//

import Foundation

class FantoryModel {
    class func factoryButton(image: String, title: String, fram: CGRect, color: UIColor, target: AnyObject, action: Selector, tag: Int) -> UIButton {
        let button = UIButton(frame: fram)
        button.setTitle(title, forState: UIControlState.Normal)
        button.setImage(UIImage(named: image), forState: UIControlState.Normal)
        button.backgroundColor = color
        button.addTarget(target, action: action, forControlEvents: UIControlEvents.TouchUpInside)
        button.tag = tag
        return button
    }
}